package practice7;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class P6 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long timeStamp=sc.nextLong();
		Date date=new Date();
		date.setTime(timeStamp-8*3600*1000);
		SimpleDateFormat sdf=new SimpleDateFormat("HH:mm:ss");
		System.out.println(sdf.format(date));

	}

}
